<template>
  <common-page
    :columns="tableColumns"
    :search-items="searchItems"
    :form-item="formItems"
    :web-path="webPath"
    :bg-path="bgPath"
  />
</template>

<script>
export default {
  name: "CommonPage",
  props: {
    bgPath: {
      type: String,
      required: true
    },
    webPath: {
      type: String,
      required: true
    },
    columns: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      searchItems: [],
      formItems: [],
      tableColumns: []
    }
  },
  created() {
    this.columns.forEach(column => {
      if (column.position.indexOf("searchItems") === -1) {
        this.searchItems.push(column)
      }
      if (column.position.indexOf("formItems") === -1) {
        this.formItems.push(column)
      }
    })
  }
}
</script>

<style scoped lang="scss">

</style>
